## Readme for "Sustaining Capitalism and Democracy: Lessons from Global Competition Policy"

Last revision: November 2021

This folder contains all of the necessary scripts to replicate the findings reported in "Sustaining Capitalism and Democracy: Lessons from Global Competition Policy" by Michael O. Allen and Kenneth Scheve.

If you have questions please feel free to get in touch with Michael Allen at michael.allen@yale.edu.

---

## Included files

Below is a list files included in the replication materials. The Data, Plots and Tables folders contain the material used in the original manuscript.

### Gravity Model

- Generate-datasets/gravity_generate_dataset.R -- R script for generating data set used for the gravity model
- Analysis/gravity_analysis.do -- STATA do file for estimating gravity models and generating tables in main text and appendix

### Event History Analysis

- Generate-datasets/cox_generate_dataset.R -- R script for generating data set used 
- Analysis/cox_analysis.R -- R script for estimating Cox models and generating tables in main text.

### Descriptive plots

- Analysis/figure_1.R -- R script for generating plots in the main text.

---

## Data requirements

Tables can be replicated using the included data sets in the Data folder. The *_generate_dataset.R scripts allows you to recreate the data sets. Because all data was obtained through secondary sources, you must download the following datasets before running either generate script:

### Gravity Model

- Comparative Competition Law Data Set, https://comparativecompetitionlaw.org/data/
- Correlates of War Trade Data Set, https://correlatesofwar.org/data-sets/bilateral-trade
- Correlates of War Intergovernmental Organizations Data Set, https://correlatesofwar.org/data-sets/IGOs
- Design of Trade Agreements Dataset, https://www.designoftradeagreements.org/downloads/
- Currency Unions, https://sites.google.com/site/josedesousauniv/home/data-and-programs
- Domestic absorption data taken from the World Bank using the `WDI` R package.

### Event History Analysis

- Comparative Competition Law Data Set, https://comparativecompetitionlaw.org/data/
- Global Financial Crises, https://www.hbs.edu/behavioral-finance-and-financial-stability/data/Pages/global.aspx
- Maddison Historical Statistics, https://www.rug.nl/ggdc/historicaldevelopment/maddison/
- Polity5, http://www.systemicpeace.org/inscrdata.html
- World Inequality Database (99% percentile income share), https://wid.world
- Trade Openness data taken from the World Bank using the `WDI` R package.

### Plots

- Comparative Competition Law Data Set, https://comparativecompetitionlaw.org/data/
- Polity5, http://www.systemicpeace.org/inscrdata.html